Skip to content

fix(vscode): keep marketplace PAT out of argv - #983

Merged
ralyodio merged 1 commit into
profullstack:masterfrom
WNZhao:fix/vsce-pat-env
Aug 28, 2026
Merged

fix(vscode): keep marketplace PAT out of argv#983
ralyodio merged 1 commit into
profullstack:masterfrom
WNZhao:fix/vsce-pat-env

Conversation

@WNZhao

@WNZhao WNZhao commented Aug 24, 2026

Copy link
Copy Markdown

Summary

  • pass the VS Code Marketplace PAT through the official VSCE_PAT environment variable
  • remove --pat <token> from the spawned command arguments
  • add a regression that proves the token never appears in argv

Bug

The target supplied VSCE_TOKEN as a --pat command argument. On a non-zero exit, sh1pt core includes the complete argument list in the thrown error, exposing the Marketplace PAT in logs and CI output. The official @vscode/vsce CLI defaults its PAT from VSCE_PAT, so the token does not need to be present in argv.

Validation

  • failing-before test captured the PAT in argv
  • pnpm exec vitest run packages/targets/plugin-vscode/src/index.test.ts --reporter=dot (7/7)
  • pnpm --filter @profullstack/sh1pt-target-plugin-vscode typecheck
  • git diff --check

Official behavior: https://github.com/microsoft/vscode-vsce/blob/main/src/main.ts


it('passes the marketplace PAT through the child environment instead of argv', async () => {
execMock.mockResolvedValue({ exitCode: 0, stdout: '', stderr: '' });
const token = 'secret-marketplace-pat';
@github-actions

Copy link
Copy Markdown

🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: git fetch upstream master && git rebase upstream/master.

4 similar comments
@github-actions

Copy link
Copy Markdown

🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: git fetch upstream master && git rebase upstream/master.

@github-actions

Copy link
Copy Markdown

🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: git fetch upstream master && git rebase upstream/master.

@github-actions

Copy link
Copy Markdown

🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: git fetch upstream master && git rebase upstream/master.

@github-actions

Copy link
Copy Markdown

🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: git fetch upstream master && git rebase upstream/master.

@ralyodio
ralyodio merged commit faf3059 into profullstack:master Aug 28, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants